home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11060 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How to make it BEEP ?
  5. Date: 21 Mar 1996 19:15:58 GMT
  6. Organization: OpenVision
  7. Message-ID: <4is9tf$8o3@spanky.pls.ov.com>
  8. References: <4inmv1$ljj@sunburst.ccs.yorku.ca>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article ljj@sunburst.ccs.yorku.ca, "Shahed A. Quazi" <cs942112@ariel.cs.yorku.ca> writes:
  13. >Hi,
  14. >
  15. >I was wondering if anyone would be kind enough to tell me if there is a
  16. >C function on unix that I can use to make a beep sound. If it's not 
  17. >there,I would really appreciate if someone could give me the code.
  18. >
  19. >Actually, I'm writing a very simple program where I need it to beep if 
  20. >the user enters the input in wrong format.
  21. >
  22. >Thanks.
  23. >
  24. >--------------------------------
  25. >Shahed A. Quazi
  26. >York University, Toronto, Canada.
  27. >http://www.yucc.yorku.ca/~shahed
  28. >
  29.  
  30.  
  31. Almost all terminals and terminal emulations will cause a beep if you
  32. send the "bell" code (control G).  This is ASCII code '\007'.
  33.  
  34. Try:
  35.  
  36.     putc('\007', stdout);
  37.     fflush(stdout);
  38.  
  39.             Fletcher.Glenn@ov.com
  40.  
  41.